﻿using System;

namespace Synapse.Framework.IoC
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class BindAttribute : Attribute
    {
        private readonly Type type;

        public BindAttribute()
        {
        }

        public BindAttribute(Type type)
        {
            this.type = type;
        }

        public Type Type() { return type; }
    }

    [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
    public class ToAttribute : Attribute
    {
        private readonly Type type;
        private readonly string key;

        public ToAttribute(Type type)
        {
            this.type = type;
        }

        public ToAttribute(string key)
        {
            this.key = key;
        }

        public Type Type() { return type; }
        public string Key() { return key; }
    }
}